#ifndef LV_PORT_INDEV_TEMPL_H
#define LV_PORT_INDEV_TEMPL_H
#include "lvgl.h"
#ifdef __cplusplus
extern "C"
{
#endif

  typedef enum
  {
    LV_KEY_X2Y1 = 200,
    LV_KEY_X2Y2,
    LV_KEY_X2Y3,
    LV_KEY_X2Y4,
    LV_KEY_X3Y1,
    LV_KEY_X3Y2,
    LV_KEY_X3Y3,
    LV_KEY_X3Y4,
    LV_KEY_X4Y1,
    LV_KEY_X4Y2,
    LV_KEY_X4Y3,
    LV_KEY_X4Y4,
    LV_KEY_X5Y2,
    LV_KEY_X5Y3,
    LV_KEY_X5Y4,
    LV_KEY_X6Y3,

    LV_KEY_X1Y2, // 快捷软件启动
    LV_KEY_X1Y3,
    LV_KEY_X1Y4,

    LV_KEY_X1Y5, // 音量调节
    LV_KEY_X2Y5,

    LV_KEY_X1Y1, // 映射表切换
    LV_KEY_X7Y1, // dial/lvgl切换

    LV_KEY_X3Y5, // 台灯控制
    LV_KEY_X4Y5,
    LV_KEY_X5Y5,
    LV_KEY_X6Y5,

    LV_KEY_X6Y4, // 休眠

    LV_KEY_X7Y2, // 桌面电源控制
    LV_KEY_X7Y3,
    LV_KEY_X7Y4,
    LV_KEY_X7Y5
  };

  extern lv_indev_t *indev_keypad;
  extern lv_indev_t *indev_encoder;
  extern lv_group_t *foc_group;
  extern lv_group_t *kb_group;

  void encoder_read(lv_indev_drv_t *indev_drv, lv_indev_data_t *data);
  void keypad_read(lv_indev_drv_t *indev_drv, lv_indev_data_t *data);
  void lv_port_indev_init(void);
#ifdef __cplusplus
}
#endif
#endif
/*
#include "lv_port_indev.h"
    extern lv_indev_t *indev_keypad;
    extern lv_indev_t *indev_encoder;
    extern lv_group_t *foc_group;
    extern lv_group_t *kb_group;


    lv_group_remove_all_objs(lv_group_get_default());
    lv_indev_set_group(indev_encoder, foc_group);
    lv_group_add_obj(foc_group, ui_Buttonpass);
    lv_group_add_obj(foc_group, ui_Buttonapp);
    lv_group_add_obj(foc_group, ui_Buttonkeyboard);
    lv_group_add_obj(foc_group, ui_Buttonrgb);
    lv_group_add_obj(foc_group, ui_buttondaskpower);
    lv_group_add_obj(foc_group, ui_buttonsmartlamp);

 lv_group_remove_all_objs(lv_group_get_default());
  lv_indev_set_group(indev_encoder, foc_group);
    lv_group_add_obj(foc_group, ui_Button1);
    lv_group_add_obj(foc_group, ui_appeasy1);
    lv_group_add_obj(foc_group, ui_appeasy2);
    lv_group_add_obj(foc_group, ui_appeasy3);
    lv_group_add_obj(foc_group, ui_gameeasy1);
    lv_group_add_obj(foc_group, ui_gameeasy2);
*/